package com.bdqn.appjob.controller;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.bdqn.appjob.entity.AppInfo;
import com.bdqn.appjob.service.backend.BackAppInfoService;

@Controller
@RequestMapping(value="manager/backend/app")
public class UpdAuditController {
	private Logger logger = Logger.getLogger(UpdAuditController.class);
	@Resource
	private BackAppInfoService appInfoService;
	
	//修改审核
	@RequestMapping(value="/checksave",method=RequestMethod.POST)
	public String updAudit(AppInfo appinfo){
		logger.debug("进来了"+appinfo.getStatus());
		if(appInfoService.updStatus(appinfo.getStatus(), appinfo.getId())){
			System.out.println("牛逼");
			return "redirect:/manager/backend/app/list";
		}
		return "backend/applist";
	}

}
